<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页|index</title>
</head>
<body>
    <a th:href="@{/user}">查询所有user</a><br/>
    <a th:href="@{/user/1}">查询id为1的user</a><br/>
    <form th:action="@{/user}" method="post">
        <input type="submit" value="添加用户">
    </form>
<!--浏览器只能发送get和post请求，要发送delete或者put请求,必须配置HiddenHttpMethodFilter过滤器,且发送的请求要满足两个条件:
        1.当前请求方式为post
        2.当前请求必须传递一个请求方式:type name value
-->
    <form th:action="@{/user}" method="post">
        <!--传递请求方式-->
        <input type="hidden" name="_method" value="put">
        <input type="submit" value="修改信息">
    </form>
    <form th:action="@{/user/1}" method="post">
        <!--传递请求方式-->
        <input type="hidden" name="_method" value="delete">
        <input type="submit" value="删除用户">
    </form>
    <hr>
    <h2>员工信息测试</h2>
    <a th:href="@{/employee}">查看所有员工</a>
</body>
</html>